/*******************************************************************************
 * Size: 24 px
 * Bpp: 1
 * Opts: --bpp 1 --size 24 --no-compress --font DS-DIGIB-2.ttf --symbols 1234567890/ADEFHIMNORSTUW --format lvgl -o font_ds_digital_bold_24.c
 ******************************************************************************/

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif

#ifndef FONT_DS_DIGITAL_BOLD_24
#define FONT_DS_DIGITAL_BOLD_24 1
#endif

#if FONT_DS_DIGITAL_BOLD_24

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+002F "/" */
    0x0, 0x40, 0x70, 0x38, 0xc, 0x7, 0x3, 0x80,
    0xe0, 0x10, 0x0, 0xe, 0x3, 0x1, 0xc0, 0xe0,
    0x30, 0xc, 0x2, 0x0, 0x80, 0x0,

    /* U+0030 "0" */
    0x7f, 0xaf, 0xdc, 0xf, 0x3, 0xc0, 0xf0, 0x38,
    0x4, 0x0, 0x80, 0x70, 0x3c, 0xf, 0x3, 0xc0,
    0xef, 0xd7, 0xf8,

    /* U+0031 "1" */
    0x1f, 0xf4, 0x7f, 0xd0,

    /* U+0032 "2" */
    0x7f, 0x8f, 0xd0, 0xc, 0x3, 0x0, 0xc0, 0x33,
    0xf0, 0xfc, 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0,
    0x2f, 0xc7, 0xf8,

    /* U+0033 "3" */
    0x7f, 0x1f, 0x40, 0x60, 0x30, 0x18, 0xd, 0xf8,
    0xfc, 0x1, 0x80, 0xc0, 0x60, 0x30, 0x19, 0xf5,
    0xfc,

    /* U+0034 "4" */
    0x0, 0x20, 0x1c, 0xf, 0x3, 0xc0, 0xf0, 0x33,
    0xf0, 0xfc, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0,
    0x40, 0x0,

    /* U+0035 "5" */
    0x7f, 0xaf, 0xcc, 0x3, 0x0, 0xc0, 0x30, 0x3,
    0xf0, 0xfc, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0,
    0xcf, 0xd7, 0xf8,

    /* U+0036 "6" */
    0x7f, 0xaf, 0xcc, 0x3, 0x0, 0xc0, 0x30, 0x3,
    0xf0, 0xfc, 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0,
    0xef, 0xd7, 0xf8,

    /* U+0037 "7" */
    0x7f, 0x1f, 0x40, 0x60, 0x30, 0x18, 0xc, 0x2,
    0x0, 0x1, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x4,

    /* U+0038 "8" */
    0x7f, 0xaf, 0xdc, 0xf, 0x3, 0xc0, 0xf0, 0x33,
    0xf0, 0xfc, 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0,
    0xef, 0xd7, 0xf8,

    /* U+0039 "9" */
    0x7f, 0xaf, 0xdc, 0xf, 0x3, 0xc0, 0xf0, 0x33,
    0xf0, 0xfc, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0,
    0xcf, 0xd7, 0xf8,

    /* U+0041 "A" */
    0x7f, 0xaf, 0xdc, 0xf, 0x3, 0xc0, 0xf0, 0x33,
    0xf0, 0xfc, 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0,
    0xe0, 0x10,

    /* U+0044 "D" */
    0x7f, 0x2f, 0xcc, 0xf, 0x3, 0xc0, 0xf0, 0x38,
    0x4, 0x0, 0x80, 0x70, 0x3c, 0xf, 0x3, 0xc0,
    0xef, 0xc7, 0xf0,

    /* U+0045 "E" */
    0x7f, 0xdf, 0xb0, 0x18, 0xc, 0x6, 0x0, 0xfc,
    0x7e, 0xc0, 0x60, 0x30, 0x18, 0xc, 0x5, 0xf9,
    0xfe,

    /* U+0046 "F" */
    0x7f, 0xdf, 0xb0, 0x18, 0xc, 0x6, 0x0, 0xfc,
    0x7e, 0xc0, 0x60, 0x30, 0x18, 0x8, 0x0, 0x0,

    /* U+0048 "H" */
    0x80, 0x70, 0x3c, 0xf, 0x3, 0xc0, 0xf0, 0x33,
    0xf0, 0xfc, 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0,
    0xe0, 0x10,

    /* U+0049 "I" */
    0x1f, 0xf4, 0x7f, 0xd0,

    /* U+004D "M" */
    0x7f, 0xaf, 0xdc, 0xf, 0x33, 0xcc, 0xf3, 0x38,
    0xc4, 0x30, 0xcc, 0xf0, 0x3c, 0xf, 0x3, 0xc0,
    0xe0, 0x10, 0x0,

    /* U+004E "N" */
    0x78, 0x2f, 0x1d, 0xef, 0x3b, 0xc6, 0xf0, 0x38,
    0x4, 0x0, 0x80, 0x70, 0x3c, 0xf, 0x3, 0xc0,
    0xe0, 0x10, 0x0,

    /* U+004F "O" */
    0x3f, 0xf, 0xcc, 0xf, 0x3, 0xc0, 0xf0, 0x38,
    0x4, 0x0, 0x80, 0x70, 0x3c, 0xf, 0x3, 0xc0,
    0xcf, 0xc3, 0xf0,

    /* U+0052 "R" */
    0x7f, 0x2f, 0xcc, 0xf, 0x3, 0xc0, 0xf0, 0x33,
    0xf0, 0xfc, 0xc0, 0x37, 0xd, 0xe3, 0x3c, 0xc3,
    0xa0, 0x70, 0xc,

    /* U+0053 "S" */
    0x3f, 0xcf, 0xfc, 0x3, 0x0, 0xc0, 0x30, 0x3,
    0xf0, 0xfc, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0,
    0xff, 0xcf, 0xf0,

    /* U+0054 "T" */
    0xff, 0xff, 0xf0, 0x0, 0x30, 0xc, 0x3, 0x0,
    0x40, 0x0, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc,
    0x3, 0x0, 0x0,

    /* U+0055 "U" */
    0x0, 0x20, 0x1c, 0xf, 0x3, 0xc0, 0xf0, 0x38,
    0x4, 0x0, 0x80, 0x70, 0x3c, 0xf, 0x3, 0xc0,
    0xcf, 0xc3, 0xf0,

    /* U+0057 "W" */
    0x0, 0x20, 0x1c, 0xf, 0x3, 0xc0, 0xf0, 0x38,
    0xc4, 0x30, 0x8c, 0x73, 0x3c, 0xcf, 0x33, 0xc0,
    0xef, 0xd7, 0xf8
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 188, .box_w = 10, .box_h = 17, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 22, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 41, .adv_w = 110, .box_w = 2, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
    {.bitmap_index = 45, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 64, .adv_w = 195, .box_w = 9, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
    {.bitmap_index = 81, .adv_w = 195, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 99, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 118, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 137, .adv_w = 195, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 1},
    {.bitmap_index = 153, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 172, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 191, .adv_w = 195, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 1},
    {.bitmap_index = 209, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 228, .adv_w = 195, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 245, .adv_w = 195, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 1},
    {.bitmap_index = 261, .adv_w = 195, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 279, .adv_w = 110, .box_w = 2, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
    {.bitmap_index = 283, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 302, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 321, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 340, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 359, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 378, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 397, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
    {.bitmap_index = 416, .adv_w = 195, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint8_t glyph_id_ofs_list_1[] = {
    0, 0, 0, 1, 2, 3, 0, 4,
    5, 0, 0, 0, 6, 7, 8, 0,
    0, 9, 10, 11, 12, 0, 13
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 47, .range_length = 11, .glyph_id_start = 1,
        .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
    },
    {
        .range_start = 65, .range_length = 23, .glyph_id_start = 12,
        .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_1, .list_length = 23, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LVGL_VERSION_MAJOR == 8
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
#endif

#if LVGL_VERSION_MAJOR >= 8
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 2,
    .bpp = 1,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LVGL_VERSION_MAJOR == 8
    .cache = &cache
#endif
};

extern const lv_font_t font_ds_digital_bold_24;


/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LVGL_VERSION_MAJOR >= 8
const lv_font_t font_ds_digital_bold_24 = {
#else
lv_font_t font_ds_digital_bold_24 = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 17,          /*The maximum line height required by the font*/
    .base_line = 1,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = -3,
    .underline_thickness = 2,
#endif
    .dsc = &font_dsc,          /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
    .fallback = &font_ds_digital_bold_24,
#endif
    .user_data = NULL,
};



#endif /*#if FONT_DS_DIGITAL_BOLD_24*/

